﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Himall.Entity.Config
{
   public class CouponInfoConfig : EntityTypeConfiguration<CouponInfo>
    {
        public CouponInfoConfig()
        {
            ToTable("Himall_Coupon");
            Property(item => item.CouponName).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.ShopName).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.IntegralCover).HasColumnType("varchar").HasMaxLength(200);
            HasRequired(x => x.Himall_Shops).WithMany(x => x.Himall_Coupon).HasForeignKey(x => x.ShopId);
        }
    }
}
